package com.kgc.service.impl;

import com.kgc.dao.BranchesDao;
import com.kgc.dao.impl.BranchesDaoImpl;
import com.kgc.entity.Branches;
import com.kgc.service.BranchesService;

import java.util.List;

public class BranchesServiceImpl implements BranchesService {

    private BranchesDao dao = new BranchesDaoImpl();

    @Override
    public List<Branches> listBranches() {
        return dao.listBranches();
    }

    @Override
    public int countBranchesByBusinessNo(String no) {
        return dao.countBranchesByBusinessNo(no);
    }

    @Override
    public int insertBranches(Branches b) {
        return dao.insertBranches(b);
    }

    @Override
    public Branches getBranchesById(int id) {
        return dao.getBranchesById(id);
    }

    @Override
    public int deleteBranchesById(int id) {
        return dao.deleteBranchesById(id);
    }
}
